<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="author" content="SHOP++ Team">
    <meta name="copyright" content="SHOP++">
    <title>SZOADEMO主页</title>
    <link href="/favicon.ico" rel="icon">
    <link href="/resources/common/css/bootstrap.css" rel="stylesheet">
    <link href="/resources/common/css/iconfont.css" rel="stylesheet">
    <link href="/resources/common/css/iconfont.css" rel="stylesheet">
    <link href="/resources/common/css/font-awesome.css" rel="stylesheet">
    <link href="/resources/common/css/base.css" rel="stylesheet">
    <link href="/resources/business/css/base.css" rel="stylesheet">
    <link href="/resources/business/css/index.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="/resources/common/js/html5shiv.js"></script>
    <script src="/resources/common/js/respond.js"></script>
    <![endif]-->
    <script src="/resources/common/js/jquery.js"></script>
    <script src="/resources/common/js/bootstrap.js"></script>
    <script src="/resources/common/js/bootstrap-growl.js"></script>
    <script src="/resources/common/js/bootbox.js"></script>
    <script src="/resources/common/js/moment.js"></script>
    <script src="/resources/common/js/jquery.nicescroll.js"></script>
    <script src="/resources/common/js/jquery.cookie.js"></script>
    <script src="/resources/common/js/underscore.js"></script>
    <script src="/resources/common/js/url.js"></script>
    <script src="/resources/common/js/g2.js"></script>
    <script src="/resources/common/js/base.js"></script>
    <script src="/resources/business/js/base.js"></script>
    <script>
        $().ready(function() {

            var $document = $(document);
            var $modal = $("#modal");
            var $logout = $("#logout");

            bootbox.alert({
                title: "提示信息",
                message: "为了确保站点的完整性，您的修改性操作将受到限制!"
            });

            $modal.modal({
                backdrop: "static",
                keyboard: false
            }).modal("show");

            // 用户注销
            $logout.click(function() {
                $document.trigger("loggedOut.shopxx.user", $.getCurrentUser());
            });

            // 订单完成数图表
            var completeOrderCountChart = new G2.Chart({
                id: "completeOrderCountChart",
                height: 200,
                forceFit: true,
                plotCfg: {
                    margin: [20, 20, 30, 80]
                }
            });

            completeOrderCountChart.source([], {
                date: {
                    type: "time",
                    tickCount: 10,
                    formatter: function(value) {
                        return moment(value).format("YYYY-MM-DD");
                    }
                },
                value: {
                    alias: "订单完成数"
                }
            });
            completeOrderCountChart.axis("date", {
                title: null,
                formatter: function(value) {
                    return moment(value).format("MM-DD");
                }
            });
            completeOrderCountChart.axis("value", {
                title: null
            });
            completeOrderCountChart.line().position("date*value").color("#66baff");
            completeOrderCountChart.render();

            $.ajax({
                url: "/business/order_statistic/data",
                type: "get",
                data: {
                    type: "COMPLETE_ORDER_COUNT"
                },
                dataType: "json",
                success: function(data) {
                    completeOrderCountChart.changeData(data);
                }
            });

            // 订单完成金额图表
            var completeOrderAmountChart = new G2.Chart({
                id: "completeOrderAmountChart",
                height: 200,
                forceFit: true,
                plotCfg: {
                    margin: [20, 20, 30, 80]
                }
            });

            completeOrderAmountChart.source([], {
                date: {
                    type: "time",
                    tickCount: 10,
                    formatter: function(value) {
                        return moment(value).format("YYYY-MM-DD");
                    }
                },
                value: {
                    alias: "订单完成金额",
                    formatter: function(value) {
                        return $.currency(value, true);
                    }
                }
            });
            completeOrderAmountChart.axis("date", {
                title: null,
                formatter: function(value) {
                    return moment(value).format("MM-DD");
                }
            });
            completeOrderAmountChart.axis("value", {
                title: null
            });
            completeOrderAmountChart.line().position("date*value").color("#ffab66");
            completeOrderAmountChart.render();

            $.ajax({
                url: "/business/order_statistic/data",
                type: "get",
                data: {
                    type: "COMPLETE_ORDER_AMOUNT"
                },
                dataType: "json",
                success: function(data) {
                    completeOrderAmountChart.changeData(data);
                }
            });

        });
    </script>
</head>
<body class="business index">
<header class="main-header">
    <div class="title hidden-xs">
        <a href="/business/index"></a>
    </div>
    <button class="main-sidebar-toggle" type="button" data-toggle="mainSidebarCollapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
    </button>
    <ul class="nav pull-right">
        <li>
            <a href="/business/store/setting">bluepure</a>
        </li>
        <li class="dropdown">
            <a class="dropdown-toggle" href="javascript:;" data-toggle="dropdown">
                <i class="iconfont icon-notice"></i>
                <span class="circle"></span>
            </a>
            <ul class="dropdown-menu dropdown-menu-right">
                <li>
                    <a href="/business/order/list?status=PENDING_PAYMENT&hasExpired=false">0个待付款订单</a>
                </li>
                <li>
                    <a href="/business/order/list?status=PENDING_REVIEW&hasExpired=false">102个待审核订单</a>
                </li>
                <li>
                    <a href="/business/order/list?status=PENDING_SHIPMENT">0个待发货订单</a>
                </li>
                <li>
                    <a href="/business/order/list?isPendingRefunds=true">0个待退款订单</a>
                </li>
            </ul>
        </li>
        <li>
            <a id="mainHeaderLogout" class="logout" href="/business/logout">
                <i class="iconfont icon-exit"></i>
                注销
            </a>
        </li>
    </ul>
</header>
<script>
    $().ready(function() {

        var $document = $(document);
        var $mainHeaderLogout = $("#mainHeaderLogout");

        // 用户注销
        $mainHeaderLogout.click(function() {
            $document.trigger("loggedOut.shopxx.user", $.getCurrentUser());
        });

    });
</script>
<script>
    $().ready(function() {

        var $window = $(window);
        var $body = $("body");
        var $mainSidebarCollapseToggle = $("[data-toggle='mainSidebarCollapse']");
        var $mainSidebar = $("#mainSidebar");
        var $searchForm = $("#mainSidebar .search form");
        var $searchValue = $("#mainSidebar .search input[name='searchValue']");
        var $panelCollapse = $("#mainSidebar .panel-collapse");

        // 主侧边栏折叠
        $mainSidebarCollapseToggle.click(function() {
            var niceScroll = $mainSidebar.getNiceScroll();
            var interval = setInterval(function() {
                niceScroll.resize();
            }, 10);

            if ($window.width() > 767) {
                $body.removeClass("main-sidebar-expanded").toggleClass("main-sidebar-mini");
            } else {
                $body.removeClass("main-sidebar-mini").toggleClass("main-sidebar-expanded");
            }

            $body.one("bsTransitionEnd", function() {
                niceScroll.resize();
                window.clearInterval(interval);
            }).emulateTransitionEnd(500);
        });

        // 主侧边栏滚动条
        $mainSidebar.niceScroll({
            cursorwidth: "4px",
            cursorcolor: "#ffffff",
            cursorborder: "0px",
            cursoropacitymax: 0.4
        });

        // 搜索
        $searchForm.submit(function() {
            if ($.trim($searchValue.val()) == "") {
                return false;
            }
        });

        // 面板折叠
        $panelCollapse.on("shown.bs.collapse hidden.bs.collapse", function() {
            $mainSidebar.getNiceScroll().resize();
        });

    });
</script>
<aside id="mainSidebar" class="main-sidebar">
    <div class="search">
        <form action="/business/product/list" method="get">
            <input name="searchProperty" type="hidden" value="name">
            <div class="input-group">
                <input name="searchValue" class="form-control" type="text" placeholder="商品搜索" x-webkit-speech="x-webkit-speech" x-webkit-grammar="builtin:search">
                <div class="input-group-btn">
                    <button class="btn btn-default" type="submit">
                        <i class="iconfont icon-search"></i>
                    </button>
                </div>
            </div>
        </form>
    </div>
    <div id="mainSidebarPanelGroup" class="panel-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#productPanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup" aria-expanded="true">
                        <i class="iconfont icon-goods"></i>
                        <span>商品管理</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="productPanelCollapse" class="panel-collapse collapse in">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/product/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                商品列表
                                <span class="label label-warning" title="库存警告商品" data-toggle="tooltip">37</span>
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/stock/log">
                                <i class="iconfont icon-weixuanzhong"></i>
                                库存记录
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/product_notify/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                到货通知
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/consultation/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                商品咨询
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/review/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                商品评论
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#orderPanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup">
                        <i class="iconfont icon-form"></i>
                        <span>订单管理</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="orderPanelCollapse" class="panel-collapse collapse">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/order/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                订单列表
                                <span class="label label-warning" title="待处理订单" data-toggle="tooltip">102</span>
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/delivery_template/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                快递单模板
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/delivery_center/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                发货点管理
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/aftersales/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                售后服务
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#storePanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup">
                        <i class="iconfont icon-shop"></i>
                        <span>店铺管理</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="storePanelCollapse" class="panel-collapse collapse">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/store/setting">
                                <i class="iconfont icon-weixuanzhong"></i>
                                店铺设置
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/store_product_category/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                店铺商品分类
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/store_product_tag/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                店铺商品标签
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/category_application/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                经营分类申请
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/store/payment">
                                <i class="iconfont icon-weixuanzhong"></i>
                                店铺缴费
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/shipping_method/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                配送方式
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/store_ad_image/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                <span>店铺广告图片</span>
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/aftersales_setting/view">
                                <i class="iconfont icon-weixuanzhong"></i>
                                <span>售后提示</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#promotionPanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup">
                        <i class="iconfont icon-like"></i>
                        <span>促销管理</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="promotionPanelCollapse" class="panel-collapse collapse">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/promotion_plugin">
                                <i class="iconfont icon-weixuanzhong"></i>
                                促销插件
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/coupon/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                优惠券
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#depositPanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup">
                        <i class="iconfont icon-recharge"></i>
                        <span>预存款管理</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="depositPanelCollapse" class="panel-collapse collapse">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/business_deposit/recharge">
                                <i class="iconfont icon-weixuanzhong"></i>
                                预存款充值
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/business_cash/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                预存款提现
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/business_deposit/log">
                                <i class="iconfont icon-weixuanzhong"></i>
                                预存款记录
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#profilePanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup">
                        <i class="iconfont icon-people"></i>
                        <span>个人资料</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="profilePanelCollapse" class="panel-collapse collapse">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/profile/edit">
                                <i class="iconfont icon-weixuanzhong"></i>
                                个人资料
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/password/edit">
                                <i class="iconfont icon-weixuanzhong"></i>
                                密码修改
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a href="#messagePanelCollapse" data-toggle="collapse" data-parent="#mainSidebarPanelGroup">
                        <i class="iconfont icon-message"></i>
                        <span>我的消息</span>
                        <i class="iconfont icon-unfold"></i>
                    </a>
                </h4>
            </div>
            <div id="messagePanelCollapse" class="panel-collapse collapse">
                <div class="panel-body">
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="/business/message/send">
                                <i class="iconfont icon-weixuanzhong"></i>
                                发送消息
                            </a>
                        </li>
                        <li class="list-group-item">
                            <a href="/business/message_group/list">
                                <i class="iconfont icon-weixuanzhong"></i>
                                我的消息
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <ul class="list-group">
        <li class="list-group-item">
            <a href="/business/instant_message/list">
                <i class="iconfont icon-wang"></i>
                <span>客服设置</span>
            </a>
        </li>
        <li class="list-group-item">
            <p>统计信息</p>
        </li>
        <li class="list-group-item">
            <a href="/business/order_statistic/list">
                <i class="iconfont icon-baobiao-xianxing text-blue-light"></i>
                <span>订单统计</span>
            </a>
        </li>
        <li class="list-group-item">
            <a href="/business/fund_statistic/list">
                <i class="iconfont icon-zhexiantu-xianxing text-green"></i>
                <span>资金统计</span>
            </a>
        </li>
        <li class="list-group-item">
            <a href="/business/product_ranking/list">
                <i class="iconfont icon-tiaoxingtu-xianxing text-yellow-light"></i>
                <span>商品排名</span>
            </a>
        </li>
    </ul>
</aside>	<main>
    <div class="container-fluid">
        <div id="modal" class="modal fade" tabindex="-1">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title">提示信息</h5>
                    </div>
                    <div class="modal-body">
                        对不起！您暂未开通店铺功能
                    </div>
                    <div class="modal-footer">
                        <a class="btn btn-primary" href="/business/store/register">店铺申请</a>
                        <a id="logout" class="btn btn-default" href="/business/logout">退出</a>
                    </div>
                </div>
            </div>
        </div>
        <ol class="breadcrumb">
            <li class="active">商家中心</li>
        </ol>
        <div class="row">
            <div class="col-xs-12 col-sm-6">
                <div class="order-info panel panel-default">
                    <div class="panel-heading">
                        <h5>订单信息</h5>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-xs-3">
                                <a href="/business/order/list?status=PENDING_PAYMENT&hasExpired=false">
                                    <div class="media">
                                        <div class="media-left hidden-xs hidden-sm hidden-md">
                                            <i class="bg-blue-light iconfont icon-pay"></i>
                                        </div>
                                        <div class="media-body media-middle">
                                            <h2 class="text-blue-light">
                                                0
                                                <small>个</small>
                                            </h2>
                                            <p>等待付款</p>
                                        </div>
                                    </div>
                                </a>
                            </div>
                            <div class="col-xs-3">
                                <a href="/business/order/list?status=PENDING_REVIEW&hasExpired=false">
                                    <div class="media">
                                        <div class="media-left hidden-xs hidden-sm hidden-md">
                                            <i class="bg-orange-light iconfont icon-time"></i>
                                        </div>
                                        <div class="media-body media-middle">
                                            <h2 class="text-orange-light">
                                                102
                                                <small>个</small>
                                            </h2>
                                            <p>等待审核</p>
                                        </div>
                                    </div>
                                </a>
                            </div>
                            <div class="col-xs-3">
                                <a href="/business/order/list?status=PENDING_SHIPMENT">
                                    <div class="media">
                                        <div class="media-left hidden-xs hidden-sm hidden-md">
                                            <i class="bg-yellow-light iconfont icon-deliver"></i>
                                        </div>
                                        <div class="media-body media-middle">
                                            <h2 class="text-yellow-light">
                                                0
                                                <small>个</small>
                                            </h2>
                                            <p>等待发货</p>
                                        </div>
                                    </div>
                                </a>
                            </div>
                            <div class="col-xs-3">
                                <a href="/business/order/list?isPendingRefunds=true">
                                    <div class="media">
                                        <div class="media-left hidden-xs hidden-sm hidden-md">
                                            <i class="bg-purple-light iconfont icon-refund"></i>
                                        </div>
                                        <div class="media-body media-middle">
                                            <h2 class="text-purple-light">
                                                0
                                                <small>个</small>
                                            </h2>
                                            <p>等待退款</p>
                                        </div>
                                    </div>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-6">
                <div class="product-info panel panel-default">
                    <div class="panel-heading">
                        <h5>商品信息</h5>
                    </div>
                    <div class="panel-body">
                        <a class="btn btn-default" href="/business/product/list?isMarketable=true">
                            已上架
                            <span class="badge" title="225">99+</span>
                        </a>
                        <a class="btn btn-default" href="/business/product/list?isOutOfStock=true">
                            缺货
                            <span class="badge" title="37">37</span>
                        </a>
                        <a class="btn btn-default" href="/business/product/list?isActive=false">
                            无效
                            <span class="badge" title="0">0</span>
                        </a>
                        <a class="btn btn-default" href="/business/product/list?isTop=true">
                            置顶
                            <span class="badge" title="0">0</span>
                        </a>
                        <a class="btn btn-default" href="/business/product/list?isStockAlert=true">
                            库存警告
                            <span class="badge" title="37">37</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h5>订单完成数统计</h5>
                    </div>
                    <div class="panel-body">
                        <div id="completeOrderCountChart"></div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h5>订单完成金额统计</h5>
                    </div>
                    <div class="panel-body">
                        <div id="completeOrderAmountChart"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
</body>
</html>